home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.coast.net!torn!nott!uottawa!jxie
- From: jxie@csi.uottawa.ca (Jun Xie)
- Newsgroups: comp.lang.c++
- Subject: ******** Questions about MSVC++ programming ********
- Date: 2 Jan 1996 16:22:15 GMT
- Organization: University of Ottawa
- Message-ID: <4cbm3n$1r4i@mercury.cc.uottawa.ca>
- NNTP-Posting-Host: grdb.csi.uottawa.ca
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
-
- Hi,
-
- I am new to the MSVC++ Ver 1.5 and MFC and have following questions.
- I appreciate it very much if you could answer any one of them or
- tell me the place (book, webpage, online help etc) where I can find
- the answers.
-
- 1) How to change the cursor to hourglass shape with MFC?
- I tried the following SDK function, but it did not work.
- HCURSOR HOldCursor = ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
- ::ShowCursor(TRUE);
-
- 2) what is the output stream class for printing?
- I know the standard print is _stdprn, but it is for MS DOS only and
- I want to send a character string to the printer under windows.
- As well, I wonder how to print the graphics image drawn on the client
- device context.
-
- 3) How to use the VBX gauge control in MSVC++?
- I know how to add it to the App Studio control palette, but do not know
- what member functions I should call to work with it.
-
- 4) How to get the current width and height of the client device context?
- I hope my graphics images drawn on the DC are proportional to its size.
- That means if you change the size of the window, the graphics image will
- change accordingly. I tried to use GetDeviceCaps() as follows, but the
- width and heigth returned are always 1024 and 768 respectively.
-
- void CXXXView::OnXXX()
- {
- // TODO: Add your command handler code here
- CClientDC dc(this);
- int width, height;
-
- width = dc.GetDeviceCaps(HORZRES);
- height = dc.GetDeviceCaps(VERTRES);
- .
- .
- .
- }
-
- Thank you for your attention.
-
-